import http from '../../utils/request'

export async function deleteNotice(ids) {
  return http.request({
    url: `/admin/deleteNotice?ids=${ids}`,
    method: 'get',
  })
}

export async function updateNotices(data) {
  return http.request({
    url: 'admin/updateNotice',
    method: 'post',
    data
  })
}

export async function getAllNotice(value,pageNo,pageSize) {
  return http.request({
    url: `admin/getAllNotice?noticeContent=${value}&pageNo=${pageNo}&pageSize=${pageSize}`,
    method: 'get',
  })
}

export async function publishNotice(data:any) {
    return http.request({
      url: 'admin/publishNotice',
      method: 'post',
      data
    })
  }